package cn.com.xyc.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class BaseDao {
	private static Configuration config;
	private static SessionFactory factory;

	static {
		config = new Configuration();
		config.configure();
		factory = config.buildSessionFactory();
	}

	public Session openSession() {
		return factory.openSession();
	}
}
